package com.liu.mybatisPlus.q.controller;

import com.liu.common.entity.ResponseResult;
import com.liu.mybatisPlus.q.service.QGroupUserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiuChengLong
 * @since 2025-04-01
 */
@RestController
@RequestMapping("/q/qGroupUser")
public class QGroupUserController {

    @Resource
    private QGroupUserService qGroupUserService;

    @CrossOrigin(origins = "http://localhost:5173", maxAge = 3600)
    @GetMapping("/login")
    public ResponseResult<Void> login(Long groupId, Long userId) {
        qGroupUserService.login(groupId, userId);
        return ResponseResult.OK("请接收机器人私聊并回复");
    }

}
